package org.budo.netty.servlet.server;

import java.util.List;
import java.util.Map;

import javax.servlet.DispatcherType;
import javax.servlet.Filter;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;

import org.budo.netty.servlet.server.connector.HttpConnector;
import org.budo.netty.servlet.server.event.EventBus;
import org.budo.netty.servlet.server.exception.handler.ExceptionHandler;
import org.budo.netty.servlet.server.handler.servlet.ServletResolved;
import org.budo.netty.servlet.server.resource.loader.ResourceLoader;
import org.budo.netty.servlet.server.session.repository.SessionRepository;

/**
 * @author li
 */
public interface BudoServletServer {
    ServletResolved resolveServlet(HttpServletRequest request);

    List<Filter> resolveFilter(HttpServletRequest request, DispatcherType dispatcherType);

    ResourceLoader getResourceLoader();

    SessionRepository getSessionRepository();

    List<String> getWelcomeFiles();

    Map<Integer, String> getErrorPages();

    ServletContext getServletContext();

    ExceptionHandler getExceptionHandler();

    EventBus getEventBus();

    HttpConnector getHttpConnector();

    void start();
}